//////////////////////////////////
///  Written by                ///
///  Filippo Alpeggiani        ///
///  ------------------        ///
///  Replacing time zone       ///
///  strings to be parsed      ///
///  in JavaScript             ///
///  ------------------        ///
///  f_alpeggiani@yahoo.it     ///
//////////////////////////////////

var time_zone_index = new Array();
time_zone_index[0] = new Array("ACDT","+1030")
time_zone_index[1] = new Array("ACST","+0930")
time_zone_index[2] = new Array("ADT","-0300")
time_zone_index[3] = new Array("AST","-0400")
time_zone_index[4] = new Array("AT","-0100")
time_zone_index[5] = new Array("AWST","+0800")
time_zone_index[6] = new Array("BST","+0100")
time_zone_index[7] = new Array("BST","-0300")
time_zone_index[8] = new Array("BT","+0600")
time_zone_index[9] = new Array("BTT","+0600")
time_zone_index[10] = new Array("CAT","+0200")
time_zone_index[11] = new Array("CCT","+0800")
time_zone_index[12] = new Array("CDT","-0500")
time_zone_index[13] = new Array("CDT","+1030")
time_zone_index[14] = new Array("CEST","+0200")
time_zone_index[15] = new Array("CET","+0100")
time_zone_index[16] = new Array("CKT","-1000")
time_zone_index[17] = new Array("CLST","-0300")
time_zone_index[18] = new Array("CLT","-0400")
time_zone_index[19] = new Array("COT","-0500")
time_zone_index[20] = new Array("CST","-0600")
time_zone_index[21] = new Array("CST","+0930")
time_zone_index[22] = new Array("CST","+0800")
time_zone_index[23] = new Array("CST","-0400")
time_zone_index[24] = new Array("CUT","")
time_zone_index[25] = new Array("ECT","-0500")
time_zone_index[26] = new Array("ECT","-0400")
time_zone_index[27] = new Array("EMT","+0100")
time_zone_index[28] = new Array("EMT","+0100")
time_zone_index[29] = new Array("EMT","+0100")
time_zone_index[30] = new Array("EMT","+0100")
time_zone_index[31] = new Array("FST","-0200")
time_zone_index[32] = new Array("WET","")
time_zone_index[33] = new Array("GST","+1000")
time_zone_index[34] = new Array("GST","+0400")
time_zone_index[35] = new Array("GST","-0300")
time_zone_index[36] = new Array("GT","")
time_zone_index[37] = new Array("HFE","+0200")
time_zone_index[38] = new Array("HST","-1000")
time_zone_index[39] = new Array("ICT","+0700")
time_zone_index[40] = new Array("ICT","+0700")
time_zone_index[41] = new Array("ICT","+0700")
time_zone_index[42] = new Array("ICT","+0700")
time_zone_index[43] = new Array("ICT","+0700")
time_zone_index[44] = new Array("IT","+0330")
time_zone_index[45] = new Array("JST","+0900")
time_zone_index[46] = new Array("KDT","+1000")
time_zone_index[47] = new Array("KST","+0900")
time_zone_index[48] = new Array("LST","")
time_zone_index[49] = new Array("MDT","-0600")
time_zone_index[50] = new Array("MST","-0700")
time_zone_index[51] = new Array("MPT","+1000")
time_zone_index[52] = new Array("MSD","+0400")
time_zone_index[53] = new Array("MSK","+0300")
time_zone_index[54] = new Array("MT","+0830")
time_zone_index[55] = new Array("MUT","+0400")
time_zone_index[56] = new Array("NST","+0330")
time_zone_index[57] = new Array("NST","+0630")
time_zone_index[58] = new Array("PDT","-0700")
time_zone_index[59] = new Array("PMT","-0300")
time_zone_index[60] = new Array("PNT","-0830")
time_zone_index[61] = new Array("PST","-0800")
time_zone_index[62] = new Array("PST","+0500")
time_zone_index[63] = new Array("SST","+0200")
time_zone_index[64] = new Array("SST","+0800")
time_zone_index[65] = new Array("TMT","+0500")
time_zone_index[66] = new Array("TST","+0300")
time_zone_index[67] = new Array("SAST","+0200")
time_zone_index[68] = new Array("WST","+0800")
time_zone_index[69] = new Array("WST","-0400")
time_zone_index[70] = new Array("WST","-1100")
time_zone_index[71] = new Array("EET","+0200")
time_zone_index[72] = new Array("EEST","+0300")

function Time_Zone_Replace(date_str) {
var t_gmt = true;
if (Date.parse(date_str) > 1) {
 t_gmt = false;
 return date_str;
}
else {
 for (var tzi = 0; tzi < time_zone_index.length; tzi++) {
  if (date_str.indexOf(" " + time_zone_index[tzi][0]) >= 0) {
//alert(date_str + " " + time_zone_index[tzi][0]);
 date_str = date_str.replace(" " + time_zone_index[tzi][0]," GMT" + time_zone_index[tzi][1]);
  t_gmt = false;
  break;
  }
}
 if (t_gmt) {
 return false;
  }
 else {
 return date_str;
  }
}
}